package org.chnxi.study.serialize.jackson;

import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;

@JsonTypeInfo(
        use = JsonTypeInfo.Id.NAME,
        include = JsonTypeInfo.As.EXTERNAL_PROPERTY,
        property = "@type"
)
@JsonSubTypes({
        @JsonSubTypes.Type(value=HeadTeacher.class , name="head"),
        @JsonSubTypes.Type(value = EnglishTeacher.class, name="english")
})
public interface Teacher {

    public String name();

}
